package com.cloud.cmt.usermanage.service;

import com.cloud.cmt.usermanage.entity.Role;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

/**
 * Created by Administrator on 2017/10/21.
 */
@RepositoryRestResource(path = "role")
public interface RoleRepository extends JpaRepository<Role, Long> {
    @Query("select u from Role u where u.roleName like ?1 ")
    Page<Role> getRoles(String value, Pageable pageInfo);
}
